export interface IResult<T = any> {
  status: number;
  msg: string;
  success: boolean;
  data: T;
}

export enum ResultCode {
  OK = 200,
  PERMISSION = 401,
}

export type R<T = any> = IResult<T>;

export interface ISendSmsParam {
  mobile: string;
}

export interface ISmsLoginParam {
  mobile: string; //手机号码
  smsCode: string; //验证码
}

export interface IUserLoginParam {
  username: string;
  password: string;
  code: string;
}

export interface IUpdateUserinfoParam {
  personName: string;
  sex: string;
  idCard: string;
  tel: string;
  address: string;
  occupation: string;
  email: string;
  clinicId: number;
}

export interface IForgotPasswordParam {
  mobile: string;
  pwd: string;
  smsCode: string;
}

export interface IUpdatePasswordParam {
  newPwd: string;
  oldPwd: string;
}

export interface IDataCollectionParam {
  age: number;
  birthday: string;
  disCls: number;
  disName: string;
  idCard: string;
  nation: number;
  pname: string;
  sex: string;
  sym: string;
  tel: string;
}

export interface INationName {
  id: string;
  name: string;
}

export type INationNameReturn = INationName[];

export interface IDisCategory {
  id: string;
  disCategory: string;
}

export interface IDisCategoryReturn {
  disCategory: IDisCategory[];
}

export interface ICaidDisease {
  CAIDName: string[];
}
export interface ICbidDisease {
  CBIDName: string[];
}
export interface ICcadDisease {
  CCAD: string[];
}
export interface IEpiDisease {
  EpiDiseaseNames: string[];
}
export interface IChrdDisease {
  CHRDName: string[];
}

export type IDataShowReturn = IDataShow[];

export interface IDataShow {
  xAxis: string[];
  disData: number[] | { value: number; name: string }[];
  disName: string;
  type: string;
}

export interface IDataShowParam {
  pageSize: number;
  pageNum: number;
}

export interface IEarlyWarning {
  PredData: number[];
  afterMonthDays: string[];
  beforeOneYearData: number[];
  Xtype: string;
  oneYearBefore: string[];
}
